Create a basket
POST/baskets
Creates a new basket which you can add products to. You must create a basket before you can call any other API endpoints.
Request
Header Parameters
The API key for the given store
Responses
- 200
The newly created empty basket.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- Array [
- ]
- ]
- Array [
- Address
- KioskCollection
- Array [
- ]
- ]
- ]
- Array [
- ]
The id of the baske.
providerBaskets object[]required
A list of all the providers in the basket. Each provider has their own basket which is aggregated into the overall basket.
totalPrice object
lineItems object[]required
A list of all line items included in the provider basket.
The type of a line item. OneBasket supports many different product types that can be added to a basket.
totalPrice object
ticketing object
A ticketing line item represents a product that is related to ticketing.
Possible values: [TicketedEvent]
The type of ticketing product this line item represents
Possible values: [SportsMatch]
If a TicketEvent type, then this indicates what sort of ticketed event.
sportsMatch object
If the event type is 'SportsMatch', contains additional information about the line item's event
The date of the match, including time
competition objectrequired
Which competition the match is part of
The name of the competition (Premier League 2021, Champions League 2021, etc)
The season of the competition (2019/20, 2020/21, etc)
The type of competition (Premier League, Champions League, etc)
hostTeam objectrequired
The home team
The id of the team
The name of the team
The team crest
opponentTeam objectrequired
The away team
The id of the team
The name of the team
The team crest
tickets object[]required
A list of tickets that have been added to the basket for this event.
The id of the ticket
The id of the seat being purchased. This is the id that the provider uses to identify the seat.
The seat category of the seat being purchased.
The tariff of the seat being purchased.
The section the seat is in
The row the seat is in
The seat number
price objectrequired
The price of the ticket, including any taxes.
consumable object
A consumable line item represents a product that a human can consume (eat or drink).
The number of instances of this product being purchased.
UnitPrice objectrequired
The price of a single instance of this product, including any taxes.
Optional - The product group that the product belongs to. For consumables, this typically represents a menu.
Optional - The kiosk from which this product is being purchased from.
Optional - The time stream that this product is being purchased within. For consumables, this typically represents a time period during an event, such as presales, early bird, half time, etc.
Optional - The time that this line item is valid until. This represents how long the current price of the line item is valid for. Pricing of products can change if they are in a time stream.
The title of the product. For example, 'Cheeseburger'.
The description of the product. For example, 'A delicious cheeseburger with a beef patty, cheese, lettuce, tomato, and onion.'
The allergens that the product contains. For example, 'Gluten, Dairy, Eggs'.
The image of the product.
The calories of the product.
deliveryMethods object[]required
The list of delivery methods available to this provider order, based on what is in the basket. This list can update as you mutate the basket with different products.
Possible values: [Address, KioskCollection, Email]
The type of the delivery method
Possible values: [Address]
options object[]required
A number of pre created addresses that the customer can select from. If this is empty, then the customer must enter a new address.
The id of the address
A one line summary of the address
Possible values: [KioskCollection]
Possible values: [Email]
customerDetails object[]required
A list of customer details that are required to be filled in before the basket can be checked out. Note that this list can change as the basket is updated (certain providers may require different details). Also, if you create the basket when not signed in, and then assign the basket to the contact later on, this list will likely require less fields.
The type of a customer detail field.
totalPrice object
{
"id": "string",
"created": "2024-01-11T21:22:38.883Z",
"updated": "2024-01-11T21:22:38.883Z",
"providerBaskets": [
{
"id": "string",
"expires": "2024-01-11T21:22:38.883Z",
"totalPrice": {
"minorUnits": 0,
"currencyCode": "string",
"precision": 0
},
"lineItems": [
{
"id": "string",
"type": "Ticketing",
"productId": "string",
"totalPrice": {
"minorUnits": 0,
"currencyCode": "string",
"precision": 0
},
"ticketing": {
"type": "TicketedEvent",
"eventType": "SportsMatch",
"sportsMatch": {
"matchDate": "2024-01-11T21:22:38.885Z",
"competition": {
"name": "string",
"season": "string",
"competitionType": "string"
},
"hostTeam": {
"id": "string",
"name": "string",
"logoImageUrl": "string"
},
"opponentTeam": {
"id": "string",
"name": "string",
"logoImageUrl": "string"
}
},
"tickets": [
{
"id": "string",
"providerSeatId": "string",
"seatCategory": "string",
"tariff": "string",
"section": "string",
"row": "string",
"seat": "string",
"price": {
"minorUnits": 0,
"currencyCode": "string",
"precision": 0
}
}
]
},
"consumable": {
"quantity": 0,
"UnitPrice": {
"minorUnits": 0,
"currencyCode": "string",
"precision": 0
},
"productGroupId": "string",
"kioskId": "string",
"timestreamId": "string",
"validUntil": "2024-01-11T21:22:38.886Z",
"title": "string",
"description": "string",
"allergens": "string",
"image": "string",
"calories": 0
}
}
],
"deliveryMethods": [
{
"type": "Email"
}
]
}
],
"customerDetails": [
{
"type": "Email"
}
],
"totalPrice": {
"minorUnits": 0,
"currencyCode": "string",
"precision": 0
}
}